<template>
  <div id="images" class="">
    <div style="position: relative;text-align: center">
      <img class="anim_fade_image" src="../../assets/img/ps4.jpg" />
      <img src="../../assets/img/ps6.jpg" />
    </div>

    <div style="position: relative;text-align: center">
      <img class="trans_fade_image" src="../../assets/img/ps4.jpg" />
      <img src="../../assets/img/ps6.jpg" />
    </div>
  </div>
</template>

<script>
  export default {
    name: 'images',
    data() {
      return {
        data: ''
      }
    },
    mounted() {

    },
    methods: {}
  }
</script>

<style lang="scss" scoped>

  /*图片hover改变*/
  .anim_fade_image {
    position:absolute;
    -webkit-transition: opacity 1s ease-in-out;
    -moz-transition: opacity 1s ease-in-out;
    -o-transition: opacity 1s ease-in-out;
    transition: opacity 1s ease-in-out;
  }
  .anim_fade_image:hover, .anim_fade_image_hover {
    opacity:0;
    filter: alpha(opacity=0);
  }


  /*图片自动改变*/
  @-webkit-keyframes fadeInOut {
    0% {
      opacity:1;
    }
    25% {
      opacity:0;
    }
    50% {
      opacity: 0;
    }
    75% {
      opacity:1;
    }
  }
  .trans_fade_image {
    position:absolute;
    -webkit-animation-name: fadeInOut;
    -webkit-animation-timing-function: ease-in-out;
    -webkit-animation-iteration-count: infinite;
    -webkit-animation-duration: 10s;
    -webkit-animation-direction: alternate;
  }

</style>
